import http from '@/utils/http'



export function insertCartAPI ({ skuId, count }) {
  return http({
      url: '/member/cart',
      method: 'POST',
      data: {
          skuId,
          count
      }
  })
}

export function findNewCartListAPI () {
  return http({
      url: '/member/cart'
  })
}

export function delCartAPI (ids) {
  return http({
      url: '/member/cart',
      method: 'DELETE',
      data: {
          ids
      }
  })
}

//* 合并购物车 实际上就是把本地购物车上传 然后获取完整线上数据覆盖就行
export function mergeCartAPI (data) {
  return http({
      url: '/member/cart/merge',
      method: 'POST',
      data
  })
}

